if exists (select name from sysobjects where name like 'Proc_TaiKhoanVay_GetById')
	drop procedure Proc_TaiKhoanVay_GetById
go

create PROC Proc_TaiKhoanVay_GetById (@maTKVay int )
as
	select * from TaiKhoanVay
	where @maTKVay= TaiKhoanVay.MaTKVay
go

Exec Proc_TaiKhoanVay_GetById 1
go
--------------------------------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanVay_GetByMaLSVay')
	drop procedure Proc_TaiKhoanVay_GetByMaLSVay
go

create PROC Proc_TaiKhoanVay_GetByMaTKVay (@maLSVay nvarchar )
as
	select * from TaiKhoanVay
	where @maLSVay= TaiKhoanVay.MaLSVay
go

------------------------------------------------------------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanVay_LoaiTien')
	drop procedure Proc_TaiKhoanVay_GetLoaiTien
go

create PROC Proc_TaiKhoanVay_GetByLoaiTien (@maLoaiTien int )
as
	select * from TaiKhoanVay
	where @maLoaiTien= TaiKhoanVay.MaLoaiTien
go

Exec Proc_TaiKhoanVay_GetById 1
go
--------------------------------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanVay_GetByMaLoaiTK')
	drop procedure Proc_TaiKhoanVay_GetByMaLoaiTK
go

create PROC Proc_TaiKhoanVay_GetByMaLoaiTK (@maLoaiTK nvarchar )
as
	select * from TaiKhoanVay
	where @maLoaiTK= TaiKhoanVay.MaLoaiTK
go
----------------------------------------------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanVay_GetByTKChinh')
	drop procedure Proc_TaiKhoanVay_GetByMaTKChinh
go

create PROC Proc_TaiKhoanVay_GetByMaTKChinh (@maTKChinh int )
as
	select * from TaiKhoanVay
	where @maTKChinh= TaiKhoanVay.MaTKChinh
go

Exec Proc_TaiKhoanVay_GetById 1
go
--------------------------------------
